import java.io.File;

public class ChangeN {
    public static Integer num=0;

    public static void main(String[] args) {
        File file = new File("C:\\Users\\liuyuan\\Desktop\\06-HBase");
        recursiveList(file);

    }

    public static File[] recursiveList(File file){
        num+=1;
        File[] files = file.listFiles();
        for (File file1 : files) {
            if (file1.isDirectory()){
                recursiveList(file1);
            }
            String name = file1.getName();
            if (name.contains("【极客学院VIP充值请进入jkxy.taobao.com  旺旺名：雅客蓝轩 客服QQ：2602575588】")){
                name=name.replaceAll("【极客学院VIP充值请进入jkxy.taobao.com  旺旺名：雅客蓝轩 客服QQ：2602575588】","");
                File newfile=new File(file1.getParent(),name);//建立新数组。
                file1.renameTo(newfile);//开始修改
            }
            System.out.println("Note : "+num+"    "+name);
        }
        return files;
    }
}
